<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>服装生产管理系统</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <i th:replace="~{common :: baseUrl}"></i>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <!--    头部-->
    <i th:replace="~{common :: head}"></i>




        <!-- 内容主体区域 -->
        <div style="background-color:white; width: 100%;height: 5%;padding-left: 70px;padding-top: 5px" >
        <span class="layui-breadcrumb" >
            <a href="" style="font-size: 20px">首页</a>
        </span>
        </div>

        <div style="background-color:#eeeeee; width: 90%; height: 650px;margin-top: 2%;margin-left: 4%">


                <!--数据信息-->


            <div align="center">
                <div class="layui-carousel" id="test3" lay-filter="test4" >
                    <div carousel-item="">
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/0a6292d156fb4cd695406d0a2efd6094.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=0oIm%2Bc0v5uba12NT1uWFZajZfTw%3D"></div>
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/82bc0ec5a1cd49b4bc64f1196e8c7396.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=vTnWVX6HCMGA3yNBDPjFbqA%2FxuE%3D"></div>
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/5b309ff813154196a88c47d077b7b92c.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=Y5gsueTq9GyXW4ab3MNTT8oR9x8%3D"></div>
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/d810147df09d41858f3f0dca26639902.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=Wd%2BeYHuZcJxJ%2FvNu46kmqlg2SfQ%3D"></div>
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/70acf125b18a48d8bcbc136083bba87a.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=uihUlozO%2FMM9MO6SMpq1cCHonPc%3D"></div>
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/401a0a26f412410c8bac62457c0cc886.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=8NIL%2Br8m%2BXBdzFKPQhFx7kvZBFE%3D"></div>
                        <div><img style="width: 100%;height: 100%" src="http://fuhaot.oss-cn-beijing.aliyuncs.com/zywbs-pic/fdff020c2c844014819a3ce5b3109402.png?Expires=1605024000&OSSAccessKeyId=LTAI4Fir8ogC45yydZoY58D9&Signature=0LgveTk7X%2BAkGKmzUvsZO0hE1vg%3D"></div>
                    </div>
                </div>

            </div>


            <!--<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">-->
                <!--<legend>设定各种参数</legend>-->
            <!--</fieldset>-->


            <div class="layui-form">

                <div class="container" style="padding-top: 10px">
                    <div class="row clearfix">
                        <div class="col-md-6 column">
                            <div class="layui-form-item">
                                <label class="layui-form-label" style="width: 90px">动画类型</label>
                                <div class="layui-input-block">
                                    <div class="layui-btn-group demoTest" style="margin-top: 5px;">
                                        <button class="layui-btn layui-btn-sm" style="background-color: #5FB878;" data-type="set" data-key="anim" data-value="default">左右切换</button>
                                        <button class="layui-btn layui-btn-sm" data-type="set" data-key="anim" data-value="updown">上下切换</button>
                                        <button class="layui-btn layui-btn-sm" data-type="set" data-key="anim" data-value="fade">渐隐渐显</button>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label"  style="width: 90px">箭头状态</label>
                                <div class="layui-input-block">
                                    <div class="layui-btn-group demoTest" style="margin-top: 5px;">
                                        <button class="layui-btn layui-btn-sm" style="background-color: #5FB878;" data-type="set" data-key="arrow" data-value="hover">悬停显示</button>
                                        <button class="layui-btn layui-btn-sm" data-type="set" data-key="arrow" data-value="always">始终显示</button>
                                        <button class="layui-btn layui-btn-sm" data-type="set" data-key="arrow" data-value="none">不显示</button>
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label"  style="width: 110px">指示器位置</label>
                                <div class="layui-input-block">
                                    <div class="layui-btn-group demoTest" style="margin-top: 5px;">
                                        <button class="layui-btn layui-btn-sm" style="background-color: #5FB878;" data-key="indicator" data-type="set" data-value="inside">容器内部</button>
                                        <button class="layui-btn layui-btn-sm" data-type="set" data-key="indicator" data-value="outside">容器外部</button>
                                        <button class="layui-btn layui-btn-sm" data-type="set" data-key="indicator" data-value="none">不显示</button>
                                    </div>
                                </div>
                            </div>


                        </div>
                        <div class="col-md-6 column">
                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label">宽高</label>
                                    <div class="layui-input-inline" style="width: 98px;">
                                        <input type="tel" name="width" value="900" autocomplete="off" placeholder="width" class="layui-input demoSet">
                                    </div>
                                    <div class="layui-input-inline" style="width: 98px;">
                                        <input type="tel" name="height" value="480" autocomplete="off" placeholder="height" class="layui-input demoSet">
                                    </div>
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <div class="layui-inline">
                                    <label class="layui-form-label"  style="width: 90px">自动切换</label>
                                    <div class="layui-input-block">
                                        <input type="checkbox" name="switch" lay-skin="switch" checked="" lay-text="ON|OFF" lay-filter="autoplay">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: auto;">时间间隔</label>
                                    <div class="layui-input-inline" style="width: 120px;">
                                        <input type="tel" name="interval" value="3000" autocomplete="off" placeholder="毫秒" class="layui-input demoSet">
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>



            </div>

        </div>






</div>
<script th:src="@{/layui/layui.js}"></script>
<script>
    //JavaScript代码区域
    layui.use(['element','carousel','form'], function(){
        var carousel = layui.carousel;
        var element = layui.element;
        var form = layui.form;


        // //改变下时间间隔、动画类型、高度
        // carousel.render({
        //     elem: '#test2'
        //     ,interval: 1800
        //     ,anim: 'fade'
        //     ,height: '120px'
        // });

        //设定各种参数
        var ins3 = carousel.render({
            elem: '#test3'
            ,width: '900px'
                ,height: '480px'
        });
        //图片轮播
        // carousel.render({
        //     elem: '#test3'
        //     ,width: '900px'
        //     ,height: '480px'
        //
        // });

        //事件
        carousel.on('change(test4)', function(res){
            console.log(res)
        });

        var $ = layui.$, active = {
            set: function(othis){
                var THIS = 'layui-bg-normal'
                    ,key = othis.data('key')
                    ,options = {};

                othis.css('background-color', '#5FB878').siblings().removeAttr('style');
                options[key] = othis.data('value');
                ins3.reload(options);
            }
        };

        //监听开关 自动切换
        form.on('switch(autoplay)', function(){
            ins3.reload({
                autoplay: this.checked
            });
        });

        $('.demoSet').on('keyup', function(){
            var value = this.value
                ,options = {};
            if(!/^\d+$/.test(value)) return;

            options[this.name] = value;
            ins3.reload(options);
        });

        //其它示例 3种状态
        $('.demoTest .layui-btn').on('click', function(){
            var othis = $(this), type = othis.data('type');
            active[type] ? active[type].call(this, othis) : '';
        });

    });
</script>
</body>
</html>
